<script type="text/javascript">
function doDelete(url,categoryID)
	{
		
		var ask = confirm('Are you sure?');
		url=url+'&sub=doDelete&id='+categoryID;	
		if(ask==true)
			{
				window.location=url;
			}
	}
</script><head>
<style type="text/css">

  th
  { background:#FF0
  
  }
  </style>
</head>

<!-- CONTENT START -->

<div id="content">

<!-- LEFT START -->
<?php
include ('themes/'.$this -> theme.'/left.php');
?>
<!-- LEFT END -->

<!-- RIGHT START -->
<div id="right">

<h2 class="right_heading">Product Categories Admin</h2>
<div id="shop_anounce">
<form action="?page=productCategories&sub=<?= $act; ?>" method="post" id="frm-image">
<input type="hidden" name="id" value="<?= $id?>" />
<table width="100%" border="0">
  <tr>
    <td width="20%">Enter Categegory</td>
    <td width="2%">&nbsp;</td>
    <td width="60%"> <input type = "text" size = "50" name = "categoryname" value="<?= $categoryname; ?>" />
  </tr>
  <tr>
  <td width = "20%">&nbsp;</td>
  <td width = "2%">&nbsp;</td>
  <td width="60%"> <input type = "submit" name = "Save" value="Save"/>

  </tr>
  <tr>
   
</table>
<br />
<br />
<?= $cmd; ?>
<br />
<div style="overflow:scroll; border-style:solid; border-color:#39C; border-width:1px;">
<table width="100%" border="0">
  <tr>
    <th width="26%" align="left">Category Name</th>
    <th width="29%" align="left">Edit</th>
    <th width="32%" align="left">Delete</th>
  </tr> 

  <!--loop-->
	<?php foreach($arrCategoriesInfo as $category): 
	$urlEdit="?page=productCategories&sub=update&id=$category[categoryID]";
	$urlDelete="?page=productCategories";
	?>
	  <tr>
	    <td width="26%" align="left"><?= $category['categoryName']; ?></td>
    	<td width="29%" align="left"><a href="<?=$urlEdit; ?>"><img src=	"iconset/pencil_16.png" alt="Edit" border="0" /></a></td>
	    <td>
        <img src="iconset/delete_16.png" alt="Delete" 
    	onclick="doDelete('<?= $urlDelete; ?>','<?= $category[categoryID]; ?>')" border="0" /></td>
	  </tr> 
<?php endforeach; ?>
<!-- End Loop-->
</table>
</div>
</form>
</div>
</div>
</div>
<!-- RIGHT END -->

<!-- Just to increase height automatically --><div id="height_increaser"></div>


<!-- CONTENT END -->
<div id="content_end"></div>